/******************************************************************************
 *  author: enquanyan
 *  version: 1.0
 *  description: link queue without lock
 *  date: 2014-07-24
 *  other: 无
 ******************************************************************************/
 
#ifndef THREAD_ARG_H
#define THREAD_ARG_H

#include "link_queue.h"
#include "locker.h"
#include <atomic>

class thread_arg
{
	
public:

	unsigned int thread_no;
	link_queue<void*> http_conn_queue;
	sem queue_stat;
	void *thread_pool_instance;
	
	//volatile unsigned int active_http_conn;
	std::atomic_int active_http_conn;
	volatile bool is_handling;
	volatile bool is_stop;
	
	volatile bool is_first;
	volatile unsigned long long interval_received_bytes_first;
	volatile unsigned long long interval_received_bytes_second;
	volatile unsigned long long interval_handled_http_conn_first;
	volatile unsigned long long interval_handled_http_conn_second;
	
	thread_arg()
	{
		//do nothing
	}
	
};

#endif 
